﻿using Fish.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
/* This Model is responsible for keeping track of each supply and its event!
 * It is also helping us in keeping track of the quantity required at each event and 
 * whether the users fulfilled it's quantity or not
 */
namespace Fish.Models
{
    public class Supplies
    {
        public int ID { get; set; }

        [Required]
        [StringLength(50, MinimumLength = 2)]
        public string Name { get; set; }

        [Required]
        [Range(0, int.MaxValue, ErrorMessage = "Quantity must be a positive number")]
        public int Quantity { get; set; }

        public virtual Events Event { get; set; }
        public virtual ICollection<Users> Users { get; set; }
        public virtual IList<MyInt> UserBringingQuantity { get; set; }
        public virtual IList<MyIntId> UserBringingID { get; set; }


    }
}
public class MyInt
{
    public int ID { get; set; }
    public int UserBringingQuantity { get; set; }
}
public class MyIntId
{
    public int ID { get; set; }
    public int UserBringingId { get; set; }
    public string UserBringingString { get; set; }
}